﻿package com.coo.util.common 
{
	import flash.net.LocalConnection;
	import flash.system.Capabilities;

	public class CommonUtil
	{
		public static function checkingEmbed(): Boolean
		{
			return ( Capabilities.playerType == "StandAlone" || Capabilities.playerType == "External" )? false : true; 
		}
		
		public static function checkingPath( localURL:String, webURL:String ): String
		{
			var fileLocalConnection: LocalConnection = new LocalConnection();
			var thisDomain:String = fileLocalConnection.domain.toString();
			var returnURL:String;
			if ( thisDomain == "localhost" )
			{
				returnURL = localURL;
			} else
			{
				returnURL = webURL;
			}
			return returnURL;
		}
	}
}